<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../common/taglibs.jsp"%>
<%@include file="RolePowerManager.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<link rel="stylesheet" href="${ctx}/css/common.css" type="text/css"></link>
		<link rel="stylesheet" href="${ctx}/css/reset.css" type="text/css"></link>
		
  <script type="text/javascript" src="${ctx}/js/transfer/transfer.js"></script>
	   <script type="text/javascript" src="${ctx}/js/jquery-1.7.2.js"></script>
	   
 		<script type="text/javascript" src="${ctx}/js/jquery.easydrag.handler.beta2.js"></script>
  		<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EmpManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/DutyManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EducationManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EduDegreeManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/SkillGradeManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/EmpStatusManager.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/interface/DeptDAOImpl.js'></script>
		
  		<script type='text/javascript' src='${ctx}/dwr/interface/TansferMag.js'></script>
		<script type='text/javascript' src='${ctx}/dwr/engine.js'></script>
  		<script type='text/javascript' src='${ctx}/dwr/util.js'></script>
		
	</head>
	<body onload="getEdu()">
		<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
			<TR height=28>
				<TD background=../images/title_bg1.jpg style="FONT-SIZE: 12px;">
					当前位置:人员档案管理 >> 人员信息查询
				</TD>
			</TR>
			<TR>
				<TD bgColor=#b1ceef height=1></TD>
			</TR>
			<TR height=20>
				<TD background=../images/shadow_bg.jpg></TD>
			</TR>
		</TABLE>
		<div class="query">
			<label>以下显示新进员工信息：</label>
			<div style="float: right; padding-right: 20px">
				<span class="STYLE1"><img src="${ctx}/images/001.gif" width="9"
						height="9" /> </span>
				<span class="STYLE1"> </span><a
					href="javaScript:popupDiv('add_div')">新增</a><span class="STYLE1"></span>
			</div>
			<div class="clear"></div>
		</div>
		<div class="bottom"></div>
		<div id="main">
			<table id="detail_t">
				<tr>
					<th>序号</th>
					<th>员工编号</th>
					<th>员工姓名</th>
					<th>学历</th>
					<th>部门</th>
					<th>职务</th>
					<th>生日</th>
					<th>人员状态</th>
					<th>技术等级</th>
					<th>更多操作</th>
				</tr>
				
				<c:forEach items="${page.list}" var="t" varStatus="status">
					<tr>
						<td>${status.index+1 }</td>
						<td id="t_en">${t.empno}</td>
						<td id="t_na">${t.name}</td>
						<td id="t_ec">${t.education.name}</td>
						<td id="t_de">${t.dept.name}</td>
						<td id="t_du">${t.duty.name}</td>
						<td id="t_t">${t.birthday}</td>
						<td id="t_es">${t.empStatus.name}</td>
						<td id="t_sg">${t.skillGrade.name}</td>
						
						<td height="18" bgcolor="#FFFFFF">
							<div align="center">
								<span class="STYLE1"><img src="${ctx}/images/037.gif"
										width="9" height="9" /> </span>
								<span class="STYLE1"> [</span><a
									href="#" onclick="emp_edit(${t.id})">详情</a><span class="STYLE1">]</span>
								
							</div>
						</td>
					</tr>
				</c:forEach>

			</table>
			<div class="manu">
				共
				<font color="#ff6600">${page.pageCount}</font>条记录当前第
				<font color="#ff6600">${page.pageNo}/${page.pageCount}</font>页
				<a href="showNewEmp?pageNo=${1}">首页</a>
				<a href="showNewEmp?pageNo=${page.pageNo-1}">上一页</a>
				<a href="showNewEmp?pageNo=${page.pageNo+1}">下一页</a>
				<a href="showNewEmp?pageNo=${page.pageCount}">末页
				</a>每页显示
				<input type="text" id="pageSize" name="pageSize" size="2" />
				条
				<input type="submit" value="提交" class="submitbuttton" onclick="changePageSize_emp()" />
			</div>
		</div>
		
		
		
<div id="edit_div" class="pop_box">
			<div class="p_head">
				<span class="p_h_title">员工详情</span>
				<span><a class="p_h_close" onclick="hideDiv('edit_div');"
					title="close">X</a> </span>
			</div>
			<div class="p_box_body" id="p_b_body">
				<div class="p_con">
					<table id="p_con_t">
						<tr>
							<td>
								员工姓名：
							</td>
							<td id="name_edit">
							</td>
						</tr>
						<tr>
							<td>
								性别：
							</td>
							<td id="sex">
							</td>
						</tr>
						<tr>
							<td>
								生日：
							</td>
							<td id="birthday_edit"> 
							</td>
						</tr>
						<tr>
							<td>
								学历：
							</td>
							<td id="edu">
							</td>
						</tr>
						<tr>
							<td >
								学位：
							</td>
							<td id="degree"></td>
						</tr>
						<tr>
				   	 	<td>部门：</td>
				    		<td id="dept"> 
				    		</td>
				    	</tr>
						<tr>
							<td>
								职位：
							</td>
							<td id="duty">
				    		</td>
						<tr>
							<td>
								技术等级：
							</td>
							<td id="skill">
				    		</td>
						</tr>
						<tr>
							<td >
								工资：
							</td>
							<td id="salary_edit">
							</td>
						</tr>
						<tr>
							<td >
								人员状态：
							</td>
							<td id="status">
				    		</td>
						</tr>
						<tr>
							<td >
								身份证：
							</td>
							<td id="idCardid_edit">
							</td>
						</tr>
						<tr>
							<td >
								学历证书：
							</td>
							<td id="educationimg_edit">
							
							</td>
						</tr>
						<tr>
							<td>
								家庭地址：
							</td>
							<td id="address_edit">
							</td>
						</tr>
						<tr>
						<tr>
							<td >
								电话：
							</td>
							<td>
							<div id="phone_edit">
								</div>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
<form id="empform" action="${ctx}/addEmp" method="post" enctype="MULTIPART/FORM-DATA">
<div id="add_div" class="pop_box">
			<div class="p_head">
				<span class="p_h_title">添加新员工</span>
				<span><a class="p_h_close" onclick="hideDiv('add_div');"title="close">X</a> </span>
			</div>
			<div class="p_box_body" id="p_b_body">
				<div class="p_con">
					<table id="p_con_t">
						
						<tr>
							<td class="t1">
								员工姓名：
							</td>
							<td>
								<input id="name_edit" name="emp_name" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								性别：
							</td>
							<td>
						
								<select id="sex_edit" name="sex_type">
								<option value="T">男</option>
								<option value="F">女</option>
								</select>
								
							</td>
						</tr>
						<tr>
							<td class="t1">
								生日：
							</td>
							<td>
								<input value="" id="bir_edit" name="bir_time" type="text"  onClick="WdatePicker()" size="10"/>
							</td>
						</tr>
						<tr>
							<td class="t1">
								学历：
							</td><td>
							<select name="educationtype" id="educationtype">
				    			<option value=""></option>
				    		</select></td>
						</tr>
						<tr>
							<td class="t1">
								学位：
							</td>
							<td>
							<select name="eduDegreetype" id="eduDegreetype">
				    			<option value=""></option>
				    		</select>
				    		</td>
						</tr>
						<tr>
				   	 	<td>部门：</td>
				    		<td>
				    		<select name="depttype" id="depttype">
				    			<option value=""></option>
				    		</select>
				    		</td>
				    	</tr>
						<tr>
							<td>
								职位：
							</td>
							<td>
				    		<select name="dutytype" id="dutytype">
				    			<option value=""></option>
				    		</select>
				    		</td>
						<tr>
							<td class="t1">
								技术等级：
							</td>
							<td>
				    		<select name="skilltype" id="skilltype">
				    			<option value=""></option>
				    		</select>
				    		</td>
						</tr>
						<tr>
							<td class="t1">
								工资：
							</td>
							<td>
								<input id="salary_edit" name="salary" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								人员状态：
							</td>
							<td>
				    		<select name="empstatustype" id="empstatustype">
				    			<option value=""></option>
				    		</select>
				    		</td>
						</tr>
						<tr>
							<td class="t1">
								家庭地址：
							</td>
							<td>
								<input id="address_edit" name="add" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								电话：
							</td>
							<td>
								<input id="phone_edit" name="phone" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								身份证：
							</td>
							<td>
								<input id="cid" name="cid" type="text" />
							</td>
						</tr>
						<tr>
							<td class="t1">
								头像：
							</td>
							<td><input type="file" name="upload_name" size="20" /></td>
						</tr>
						<tr>
							<td class="t1">
								学历证书：
							</td>
							<td>
								<input id="eid" name="eid" type="text" />
							</td>
						</tr>
						<tr>
							<td></td>
							<td>
								<input type="button" value="提交" onclick="addEmp()" />
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		</form>
	</body>
</html>